using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Dimok.Data.DataSources;

namespace Data.DataSources {
	public class VantageCommentsDataSource : ObjectDataSourceBase {
		public override string SelectViewName { get { return "vantage.vw_Note"; } }
		public override string InsertViewName { get { throw new NotImplementedException(); } }
		public int LoanID { set { SetSelectParameter(LOAN_ID, value); } }
		public string UsixID { set { SetSelectParameter(USIX_ID, value); } }
		public VantageCommentsDataSource() {
			OrderBy.Add("CreatedDate DESC");
		}
		public DataView SelectEx(string VantageID) {
			if( VantageID+"" != "" || Where.Count == 0 )
				return Select("VantageID=@VID", VantageID);
			return SelectEx();
		}
	}
}